{include file="public/head"/}
<div class="container-fluid" id="main">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info">
                <button type="button" class="close">×</button>
                <p></p>
            </div>
        </div>
    </div>
   
    <div class="ntDesktop">
    	<div class="ntDesktop-head">{:strtoupper(lang("product_brand"))}</div>
        
        <div class="row clearfix" style="padding-top:0px">
            <div class="col-md-12 column text-right">
                <div>
                    <a :href="'/admin/probrand/brandAdd?request=add'" class='btn btn-primary' data-toggle="modal" data-target="#brand_editModal" v-if="auth_ids.indexOf(151) != -1">
                        <span class="glyphicon glyphicon-plus"></span> {:strtoupper(lang("add_new_product_brand"))}</a>
                </div>
            </div>
        </div>
    
        <div class="row clearfix">
            <div class="col-md-12 column">
                <table class="table table-striped table-hover ntTable">
                    <thead>
                        <tr>
                            <th style="text-align:center"><input type="checkbox"  /> </th>
                            <th> {:strtoupper(lang('name'))} </th>
                            <th> {:strtoupper(lang("icon"))} </th>
                            <th> {:strtoupper(lang('operate'))} </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(item,index) in listdata" v-cloak>
                            <td align="center"><input type="checkbox"  value="item.id" /></td>
                            <td> {{item.name}} </td>
                            <td> <img :src="item.img_path" border="0" width="50px" height="50px"></td>
                            <td class="text-right">
                                <div>
                                    <a :href="'/admin/probrand/brandEdit?request=edit&id='+item.id" class='btn btn-sm btn-primary' data-toggle="modal" data-target="#brand_editModal" v-if="auth_ids.indexOf(152) != -1">
                                        <span class="glyphicon glyphicon-pencil"></span> {:strtoupper(lang('edit'))}</a>
                                    <a href="#" class='btn btn-sm btn-default option-del' @click="requestStatus(item.id,'update',2,'batchDel')" v-if="item.status!=2 && auth_ids.indexOf(197) != -1" >
                                        <span class="glyphicon glyphicon-trash"></span> {:strtoupper(lang('delete'))}</a>
                                    <a href="javascript:;" class='btn btn-sm btn-default option-recover' @click="requestStatus(item.id,'update',1,'batchRestore')" v-if="item.status!='1' && auth_ids.indexOf(198) != -1">
                                        <span class="glyphicon glyphicon-heart"></span>{:strtoupper(lang('recovery'))}</a>
                                    <a href="javascript:;" class='btn btn-sm btn-danger option-clear' @click="requestStatus(item.id,'deletes',9,'batchClear')" v-if="item.status=='2' && auth_ids.indexOf(199) != -1">
                                        <span class="glyphicon glyphicon-fire"></span> {:strtoupper(lang('clear'))}</a>
                                </div>
                            </td>
                        </tr>
                        <tr style="text-align: center;" v-if="listdata.length==0">
                                <td colspan="4" class="no_date">{:lang('no_data')}</td>
                            </tr>
                    </tbody>
                </table>
                <ul class="pagination" id="pagination" v-show="listdata.length!=0">
                </ul>
            </div>
        </div>
    </div>
</div>

<!--添加弹窗部分 开始-->

<div class="modal fade" id="brand_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel" aria-hidden="true"  data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">

        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<script type="text/javascript">
    $("#brand_editModal").on("hidden.bs.modal", function() {
        $(this).removeData("bs.modal");
        $(".modal-content").children().remove();
    });
</script>
<!--弹窗部分 结束-->
<script src="/static/Admin/js/brand.js"></script>
{include file="public/foot"/}